package com.itheima.web.controller;

import com.itheima.web.manager.WXLoginManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WXLoginController {
    @Autowired
    private WXLoginManager wxLoginManager;

    @GetMapping("weixinlogin")
    public ResponseEntity wxLogin(String code){
        System.out.println(code);
        return wxLoginManager.wxLogin(code);
    }
}
